<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%
    String date = input.getDesc("date", "=====");
    Set result = new TreeSet();
    List list = QBuilder.db("basedb").select("distinct CONCAT(FROM_UNIXTIME(registerTime/1000,'%Y-%m-%d'),'')").from("Order").where(new Where("hospital=", hospital).and("status=", STATUS_ENABLE).and("CONCAT(FROM_UNIXTIME(registerTime/1000,'%Y-%m'),'')=", date).and("state=",STATE_ADD)).order("registerTime", QBuilder.asc).query().getResultObj();
    result.addAll(list);
    list = QBuilder.db("basedb").select("distinct CONCAT(FROM_UNIXTIME(execTime/1000,'%Y-%m-%d'),'')").from("Order").where(new Where("hospital=", hospital).and("status=", STATUS_ENABLE).and("CONCAT(FROM_UNIXTIME(execTime/1000,'%Y-%m'),'')=", date).and("state in("+STATE_HANDLED+","+STATE_OVER+","+STATE_HANDLED_CANCEL+")")).order("execTime", QBuilder.asc).query().getResultObj();
    result.addAll(list);
    msg.put("data", result);
    Tools.encryptPrint(out, msg);
%>
